package edums.common.model.dao;

import java.sql.SQLException;

import org.springframework.orm.ibatis.SqlMapClientTemplate;

import edums.common.dto.AuthoritiesDTO;

public class AuthoritiesDAOImpl implements AuthoritiesDAO {
	
	private SqlMapClientTemplate client;

	public void setSqlMapClient(SqlMapClientTemplate client) {
		this.client = client;
	}

	@Override
	public Object insertAuthorities(AuthoritiesDTO authDTO) throws SQLException {
		return client.insert("authorities.insertAuthorities", authDTO);
	}
	@Override
	public int updateAuthorities(AuthoritiesDTO authDTO) throws SQLException {
		return client.update("authorities.updateAuthorities", authDTO);
	}
	@Override
	public int deleteAuthorities(String userId) throws SQLException {
		return client.delete("authorities.deleteAuthorities", userId);
	}
}
